import { ThreeLoader } from "../three/loader";
import { ThreeSprite } from "../three/sprite";

export class PointSprite {
    private threeLoader = new ThreeLoader();
    private threeSprite = new ThreeSprite();

    // 加载问号
    load(pointParams: { name: string; scale: number; x: number; y: number; z: number; }) {
        const pointTexture = this.threeLoader.texture().load('./assets/images/point.png');
        const point = this.threeSprite.create(pointTexture);
        point.name = pointParams.name;
        point.scale.set(pointParams.scale * 1.2, pointParams.scale * 1.2, pointParams.scale * 1.2);
        point.position.set(pointParams.x, pointParams.y, pointParams.z);
        return point;
    }
}